﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace NET4.Database
{
  public static class Validation
  {
    public static Boolean IsZipCode(String zipCode)
    {
      return true;
    }

    public static Boolean IsPhoneNumber(String phoneNumber)
    {
      return true;
    }

    public static Boolean IsEmail(String email)
    {
      Regex r = new Regex(@"^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$");
      return r.IsMatch(email);
    }
  }
}
